package com.demo.aop;

import android.app.Application;
import android.widget.Toast;

import com.aspectj.aop.root.AndroidAOP;
import com.aspectj.aop.utils.ArrayUtils;

public class MyApp extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        AndroidAOP.init(this);
        AndroidAOP.setmDebug(true);
        AndroidAOP.setmOnEventTrackCallback((int what, String[] value)->{
            Toast.makeText(this, "埋点触发what=" + what + ",value=" + ArrayUtils.toString(value), Toast.LENGTH_LONG).show();
        });
    }

}
